package net.huashitong.scheduling.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;

import net.huashitong.scheduling.entity.ExpenditureSchedule;
@Repository
public class ExpenditureScheduleDao extends StringDao<ExpenditureSchedule>{
   public List<ExpenditureSchedule> queryByDate(String month,String year){
	   GenericQuery query = createQuery("obj");
		query.append(" and obj.month= :month").setParam("month", month);
	   query.append(" and obj.year= :year  ORDER BY CAST(obj.completeExpenditure as int) DESC").setParam("year", year);
	   return query.listResult();
   }
}
